Skip to content

clippy fix: rely on autoderef #143424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025
Merged

clippy fix: rely on autoderef #143424

merged 1 commit into from
Jul 25, 2025

Conversation

hkBst
Copy link
Member

@hkBst hkBst commented Jul 4, 2025

Changes instances of &**self to self.

@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 4, 2025
@hkBst
Copy link
Member Author

hkBst commented Jul 8, 2025

There was some objection to changes like these, because the more explicit form can give more insight into what's really happening. I suppose this is true, but then why have autoderef in the language? And with autoderef in the language is there any guarantee that this more explicit syntax remains correct, or will autoderef fix up any mistakes silently?

@jhpratt
Copy link
Member

jhpratt commented Jul 18, 2025

Per #143423 (comment), can you add this lint to src/bootstrap/src/core/build_steps/clippy.rs?

@hkBst
Copy link
Member Author

hkBst commented Jul 23, 2025

@jhpratt I'm slowly chipping away at the many warnings that are generated, so I think it is a bit premature to try and enable lints globally to stay clean.

@jhpratt
Copy link
Member

jhpratt commented Jul 24, 2025

Makes sense. I presume from that statement that there are a number of auto-deref related lints. Feel free to request me as a reviewer for those, as they're trivial to review (unlike a number of other lints).

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 24, 2025

📌 Commit b315e9a has been approved by jhpratt

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 24, 2025
fmease added a commit to fmease/rust that referenced this pull request Jul 24, 2025
clippy fix: rely on autoderef

Changes instances of `&**self` to `self`.
bors added a commit that referenced this pull request Jul 24, 2025
Rollup of 16 pull requests

Successful merges:

 - #142569 (Suggest clone in user-write-code instead of inside macro)
 - #143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - #143424 (clippy fix: rely on autoderef)
 - #143970 (Update core::mem::copy documentation)
 - #143979 (Test fixes for Arm64EC Windows)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144200 (Tweak output for non-`Clone` values moved into closures)
 - #144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - #144225 (Don't special-case llvm.* as nounwind)
 - #144314 (Hint that choose_pivot returns index in bounds)
 - #144316 (bootstrap: Move musl-root fallback out of sanity check)
 - #144364 (Update `dlmalloc` dependency of libstd)
 - #144368 (resolve: Remove `Scope::CrateRoot`)
 - #144373 (remove deprecated Error::description in impls)
 - #144390 (Remove dead code and extend test coverage and diagnostics around it)
 - #144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)

r? `@ghost`
`@rustbot` modify labels: rollup
fmease added a commit to fmease/rust that referenced this pull request Jul 25, 2025
clippy fix: rely on autoderef

Changes instances of `&**self` to `self`.
bors added a commit that referenced this pull request Jul 25, 2025
Rollup of 17 pull requests

Successful merges:

 - #142569 (Suggest clone in user-write-code instead of inside macro)
 - #143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - #143424 (clippy fix: rely on autoderef)
 - #143970 (Update core::mem::copy documentation)
 - #143979 (Test fixes for Arm64EC Windows)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144200 (Tweak output for non-`Clone` values moved into closures)
 - #144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - #144225 (Don't special-case llvm.* as nounwind)
 - #144314 (Hint that choose_pivot returns index in bounds)
 - #144316 (bootstrap: Move musl-root fallback out of sanity check)
 - #144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`)
 - #144364 (Update `dlmalloc` dependency of libstd)
 - #144368 (resolve: Remove `Scope::CrateRoot`)
 - #144390 (Remove dead code and extend test coverage and diagnostics around it)
 - #144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)
 - #144424 (Allow setting `release-blog-post` label with rustbot)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 25, 2025
clippy fix: rely on autoderef

Changes instances of `&**self` to `self`.
Kobzol added a commit to Kobzol/rust that referenced this pull request Jul 25, 2025
clippy fix: rely on autoderef

Changes instances of `&**self` to `self`.
bors added a commit that referenced this pull request Jul 25, 2025
Rollup of 16 pull requests

Successful merges:

 - #142569 (Suggest clone in user-write-code instead of inside macro)
 - #143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - #143424 (clippy fix: rely on autoderef)
 - #143970 (Update core::mem::copy documentation)
 - #143979 (Test fixes for Arm64EC Windows)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144200 (Tweak output for non-`Clone` values moved into closures)
 - #144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - #144314 (Hint that choose_pivot returns index in bounds)
 - #144316 (bootstrap: Move musl-root fallback out of sanity check)
 - #144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`)
 - #144364 (Update `dlmalloc` dependency of libstd)
 - #144368 (resolve: Remove `Scope::CrateRoot`)
 - #144390 (Remove dead code and extend test coverage and diagnostics around it)
 - #144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)
 - #144424 (Allow setting `release-blog-post` label with rustbot)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 25, 2025
Rollup of 12 pull requests

Successful merges:

 - #142569 (Suggest clone in user-write-code instead of inside macro)
 - #143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - #143424 (clippy fix: rely on autoderef)
 - #143970 (Update core::mem::copy documentation)
 - #143979 (Test fixes for Arm64EC Windows)
 - #144200 (Tweak output for non-`Clone` values moved into closures)
 - #144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - #144314 (Hint that choose_pivot returns index in bounds)
 - #144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`)
 - #144368 (resolve: Remove `Scope::CrateRoot`)
 - #144390 (Remove dead code and extend test coverage and diagnostics around it)
 - #144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit dd159ee into rust-lang:master Jul 25, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 25, 2025
rust-timer added a commit that referenced this pull request Jul 25, 2025
Rollup merge of #143424 - hkBst:auto-deref, r=jhpratt

clippy fix: rely on autoderef

Changes instances of `&**self` to `self`.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jul 28, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#142569 (Suggest clone in user-write-code instead of inside macro)
 - rust-lang/rust#143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - rust-lang/rust#143424 (clippy fix: rely on autoderef)
 - rust-lang/rust#143970 (Update core::mem::copy documentation)
 - rust-lang/rust#143979 (Test fixes for Arm64EC Windows)
 - rust-lang/rust#144200 (Tweak output for non-`Clone` values moved into closures)
 - rust-lang/rust#144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - rust-lang/rust#144314 (Hint that choose_pivot returns index in bounds)
 - rust-lang/rust#144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`)
 - rust-lang/rust#144368 (resolve: Remove `Scope::CrateRoot`)
 - rust-lang/rust#144390 (Remove dead code and extend test coverage and diagnostics around it)
 - rust-lang/rust#144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)

r? `@ghost`
`@rustbot` modify labels: rollup
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Jul 28, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#142569 (Suggest clone in user-write-code instead of inside macro)
 - rust-lang/rust#143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - rust-lang/rust#143424 (clippy fix: rely on autoderef)
 - rust-lang/rust#143970 (Update core::mem::copy documentation)
 - rust-lang/rust#143979 (Test fixes for Arm64EC Windows)
 - rust-lang/rust#144200 (Tweak output for non-`Clone` values moved into closures)
 - rust-lang/rust#144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - rust-lang/rust#144314 (Hint that choose_pivot returns index in bounds)
 - rust-lang/rust#144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`)
 - rust-lang/rust#144368 (resolve: Remove `Scope::CrateRoot`)
 - rust-lang/rust#144390 (Remove dead code and extend test coverage and diagnostics around it)
 - rust-lang/rust#144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants